<?php
/**
 * User:chendenan
 * Created On 2022/3/16 0016 21:16
 */
namespace app\admin\validate;
use think\Validate;
class Category extends Validate{
    protected  $rule = [
        'pid'=>'require',
        'name'=>'require',
        'id'=>'require',
        'order'=>'require',
        'status'=>'require|in:0,1,99',
    ];
    protected  $message  =[
        'pid.require' =>'父类必须',
        'name.require' =>'分类名必须',
        'id.require' => '参数必须',
        'order.require' => '排序必须',
        'status.require'=> '状态必须',
        'status.in' => '状态错误',
    ];
    protected  $scene = [
        'add' =>['pid','name'],
        'order' =>['order'],
        'status' =>['status'],
    ];
}